<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="/authtaglib" prefix="auth" %>
<!DOCTYPE html>
<html>
<head>
<title>定位基础管理</title>
<jsp:include page="/include.jsp"/>
<script type="text/javascript">
 $(function(){
 
 $.ajax({
        url: '${pageContext.request.contextPath}/cnbdw/menuAction!selectLocationState.action',
        dataType: 'json',
        
        success: function (result) {
            try {
                if (result.returnFlag) {
                 //  alert(result.returnMsg);
                   document.getElementById("state1").innerHTML =  result.returnMsg;
                }
                 
            } catch (e) {
            }
        }
    });
 
 
 })


function stateSet(){
var state=$("#locationState input[name=state]:radio[checked]").val();
 $.ajax({
        url: '${pageContext.request.contextPath}/cnbdw/menuAction!setLocationState.action',
        dataType: 'json',
        data: {
            state:state    
        },
        success: function (result) {
            try {
                if (result.returnFlag) {
                    $('#datagrid').datagrid('reload');
                   
                }
                $.messager.show({title: '提示', msg: result.returnMsg});
                
                setTimeout(function(){location.reload()},1000);
                 
            } catch (e) {
            }
        }
    });
}
</script>
</head>
<body class="easyui-layout">
    
    <div data-options="region:'center'" style="width:180px;border-bottom:none;border-top:none;">
       <div id="state1"  style="font-size:20px" >
    
    </div>
                 <div id="locationState" style="width:20%;text-align:left;">
                    <label >人员定位是否开启：</label>
              
                    <input type="radio" name="state" value="1"  class="easyui-validatebox"data-options="validType:'specialCharFilter'"/>开启
               
              
                    <input type="radio" name="state" value="0" class="easyui-validatebox"data-options="validType:'specialCharFilter'"/>关闭
                  
                    <input type="button" id="btnQuery" onclick="stateSet()" value="确认" class="search_btn"/>
                  </div>  
              
    </div>
    
   
<
</body>
</html>

